<?php 
//移动宝贝到其他秀店
$userid = intval($TS_USER['user']['userid']);
$topicid = intval($_GET['topicid']);
$talkid = intval($_GET['talkid']);

if($talkid == 0 || $topicid == 0) qiMsg("非法操作！");

$strGroup = $db->once_fetch_assoc("select talkid,userid from ".dbprefix."talk where talkid='$talkid'");

$strTopic = $db->once_fetch_assoc("select topicid,userid,talkid,title from ".dbprefix."talk_topics where topicid='$topicid'");

$strUser = $db->once_fetch_assoc("select userid,isadmin from ".dbprefix."user_info where userid='$userid'");


if($userid == $strTopic['userid'] || $strUser['isadmin']=='1' || $userid==$strGroup['userid']){

	if($strGroup && $strTopic){
		if($strTopic['talkid'] == $talkid){
			$arrGroups = $db->fetch_all_assoc("select talkid from ".dbprefix."talk_users where userid='".$strTopic['userid']."'");
			foreach($arrGroups as $item){
				$arrGroup[] = aac('talk')->getOneGroup($item['talkid']);
			}
			
			$title = '移动宝贝';
			//包含模板 
			include template("topic_move");
		}
	}else{
		qiMsg("非法操作3！");
	}

}else{
	qiMsg("非法操作2！");
}

